# 创建时间:2024/4/13 下午5:01
# 创建人:天霄
# 基于 Python 3.11
# ========================================
# 全局常量/变量
# ========================================
import pathlib
from dataclasses import dataclass

__all__ = ['CONST']


@dataclass(frozen=True)
class Paths:
    """全局路径，ROOT代表目录，PATH代表文件"""
    ROOT: pathlib.Path = pathlib.Path(__file__).parent
    DATA_ROOT = ROOT / 'Data'   # 数据目录
    LOG_ROOT = ROOT / 'log'    # 输出日志目录
    ASSETS_ROOT = ROOT / 'Data' / 'assets'  # 资源目录
    CHARIMAGE_ROOT = ASSETS_ROOT / 'res' / 'charimage'  # 立绘图片目录
    TEXT_ROOT = ASSETS_ROOT / 'res' / 'text'  # 名字图片目录
    SOUND_ROOT = ASSETS_ROOT / 'res' / 'sound'  # 声音文件总目录
    ICON_ROOT = ASSETS_ROOT / 'res' / 'icon'  # 图标文件总目录
    BG_ROOT = ASSETS_ROOT / 'res' / 'bg'  # 背景文件总目录
    SCENE_BG_ROOT = BG_ROOT / 'scenebg'

    DATABASE_PATH = DATA_ROOT / 'SenjoTwintail.db'
    CONFIG_YAML_PATH = ROOT / 'config.yaml'
    SAVE_DATA_PATH = DATA_ROOT / 'saveData.yaml'


@dataclass(frozen=True)
class Const:
    """全局常量"""
    VERSION = '0.0.1'
    TITLE = f'战场双马尾 [纪念版-v{VERSION}]'
    PATH = Paths()


CONST = Const()



